/************************************************************
**                                                         **
** FILE: PAD_Defs.h                                        **
**                                                         **
** DESCRIPTION:PAD definitions for easy compression        **
**                                                         **
** VERSION: 1.0                                            **
**                                                         **
** AUTOR: Emmanuel Sigala                                  **
**                                                         **
** DATE: 27/September/2012                                 **
**                                                         **
************************************************************/


/*********************************************
Genaral purpose input output definitions    **
of PORTB                                    **
*********************************************/

#define L_MOTOR_SWITCH SIU.GPDO[16].B.PDO          //PB[0]

#define R_MOTOR_SWITCH SIU.GPDO[17].B.PDO           //PB[1]

#define CAM_START SIU.GPDO[27].B.PDO               //PB[11]

#define CAM_CLK SIU.GPDO[29].B.PDO                 //PB[13]


/*********************************************
Genaral purpose input output definitions    **
of PORTE                                    **
*********************************************/

#define PUSH_1 SIU.GPDI[64].B.PDI          //PE[0]

#define PUSH_2 SIU.GPDI[65].B.PDI          //PE[1]

#define PUSH_3 SIU.GPDI[66].B.PDI          //PE[2]

#define PUSH_4 SIU.GPDI[67].B.PDI          //PE[3]

#define LED_1 SIU.GPDO[68].B.PDO           //PE[4]

#define LED_2 SIU.GPDO[69].B.PDO           //PE[5]

#define LED_3 SIU.GPDO[70].B.PDO           //PE[6]

#define LED_4 SIU.GPDO[71].B.PDO           //PE[7]


/*********************************************
CBDR registers of the EMIOS_0               **                                 
*********************************************/

#define DIRECTION_PWM EMIOS_0.CH[4].CBDR.R 

#define LEFT_PWM EMIOS_0.CH[6].CBDR.R 

#define RIGHT_PWM EMIOS_0.CH[7].CBDR.R 

#define LIGHT_1 EMIOS_0.CH[9].CBDR.R 

#define LIGHT_2 EMIOS_0.CH[11].CBDR.R

#define LIGHT_3 EMIOS_0.CH[13].CBDR.R 
 

/*********************************************
FLAG registers of the EMIOS_0               **                                 
*********************************************/
  
#define FLAG_20ms EMIOS_0.CH[23].CSR.B.FLAG

/*********************************************
DATA registers of the ADC module            **                                 
*********************************************/

#define ANP0 ADC.CDR[0].B.CDATA
#define ANP1 ADC.CDR[1].B.CDATA
#define ANP2 ADC.CDR[2].B.CDATA
#define ANP3 ADC.CDR[3].B.CDATA
#define ANP4 ADC.CDR[4].B.CDATA
//#define ANP5 ADC.CDR[5].B.CDATA
//#define ANP6 ADC.CDR[6].B.CDATA
//#define ANP7 ADC.CDR[7].B.CDATA
//#define ANP8 ADC.CDR[8].B.CDATA
//#define ANP9 ADC.CDR[9].B.CDATA
//#define ANP10 ADC.CDR[10].B.CDATA
//#define ANP11 ADC.CDR[11].B.CDATA
//#define ANP12 ADC.CDR[12].B.CDATA
//#define ANP13 ADC.CDR[13].B.CDATA
//#define ANP14 ADC.CDR[14].B.CDATA
//#define ANP15 ADC.CDR[15].B.CDATA


